﻿using System.Net;
using System.Threading.Tasks;
using System.Web.Mvc;

namespace System
{
    public static class ServiceWebExtensions
    {
        public static ActionResult ToDbServiceResult(this int dbResult)
        {
            return dbResult > 0 ? new HttpStatusCodeResult(HttpStatusCode.Accepted) : new HttpStatusCodeResult(HttpStatusCode.InternalServerError);
        }
    }
}
